From 2687a9d1325e5972790724b290a2f1385a19fc3d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Tue, 30 May 2017 17:44:05 +0200 Subject: [PATCH] entry: Fix text position --- gtk/gtkentry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index 02656566b9..a8fa3dd1f4 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -3037,7 +3037,7 @@ gtk_entry_get_text_allocation (GtkEntry *entry, GtkEntryPrivate *priv = entry->priv; gtk_widget_get_content_allocation (GTK_WIDGET (entry), allocation); - allocation->x += priv->text_x; + allocation->x = priv->text_x; allocation->width = priv->text_width; } @@ -3474,8 +3474,8 @@ gtk_entry_snapshot (GtkWidget *widget, /* Draw text and cursor */ cr = gtk_snapshot_append_cairo (snapshot, - &GRAPHENE_RECT_INIT (allocation.x + priv->text_x, - allocation.y, + &GRAPHENE_RECT_INIT (priv->text_x, + 0, priv->text_width, allocation.height), "Entry Text"); -- 2.30.2